﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace Pc_Vision.View_Datalayer
{
    public partial class viewCategorieDelete : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void RadGrid1_DeleteCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            DAOFactorys.DAOcategorie Dao = new DAOFactorys.DAOcategorie();
            Model.Categorie c = new Model.Categorie();
            GridDataItem item = (GridDataItem)e.Item;
            string categorieID = item.OwnerTableView.DataKeyValues[item.ItemIndex]["Categorieid"].ToString();
            c.id = categorieID;
            Dao.DeleteCategorie(c);



        }
    }
}